/**
 * Author: Shen Yanqiu
 * Date: 2017-12-06
 * Time: 15:01
 *
 */
import React from 'react';
import { connect } from "dva";
import PropTypes from 'prop-types';
import { Page } from 'components';
import AddPage from "./Subpage/AddPage";

class addExpenditure extends React.Component {
  static PropTypes = {
    loading: PropTypes.object,
    dispatch: PropTypes.func,
    expenditure: PropTypes.object,
    location: PropTypes.object,
  };
  render () {
    const { loading, location, expenditure, dispatch } = this.props;
    // 提交表单数据
    function onSubmit (values) {
      console.log(values);
    }
    return (
      <Page loading={loading.models.expenditure}>
        <AddPage onSubmit={onSubmit} />
      </Page>
    );
  }
}

export default connect(({ loading, expenditure }) => ({ loading, expenditure }))(addExpenditure);
